import { z } from "zod";
import { tool } from "@langchain/core/tools";
import { ToolMessage } from "@langchain/core/messages";

export function searchVerStore() {
  return tool(
    (state) => {
      console.log(state);
      return new ToolMessage(state.query);
    },
    {
      name: "search-tool",
      description: "search storage tool",
      schema: z.object({
        query: z.string(),
      }),
      responseFormat: "content_and_artifact",
    }
  );
}
